package com.zhongketech.sunflower.transport.model;

import android.database.sqlite.SQLiteDatabase;

import java.util.Map;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;

import com.zhongketech.sunflower.transport.model.User;
import com.zhongketech.sunflower.transport.model.School;
import com.zhongketech.sunflower.transport.model.Classes;
import com.zhongketech.sunflower.transport.model.Parents;
import com.zhongketech.sunflower.transport.model.Authorizations;
import com.zhongketech.sunflower.transport.model.SmsCode;
import com.zhongketech.sunflower.transport.model.MyRequest;
import com.zhongketech.sunflower.transport.model.Request;
import com.zhongketech.sunflower.transport.model.MyContacts;
import com.zhongketech.sunflower.transport.model.Contact;
import com.zhongketech.sunflower.transport.model.MyApplicationsInfo;
import com.zhongketech.sunflower.transport.model.MySupervision;
import com.zhongketech.sunflower.transport.model.Supervision;
import com.zhongketech.sunflower.transport.model.Times;
import com.zhongketech.sunflower.transport.model.EyeProtect;
import com.zhongketech.sunflower.transport.model.ApplicationControl;
import com.zhongketech.sunflower.transport.model.Applications;
import com.zhongketech.sunflower.transport.model.Call;
import com.zhongketech.sunflower.transport.model.Sms;
import com.zhongketech.sunflower.transport.model.ScreenLock;
import com.zhongketech.sunflower.transport.model.Network;
import com.zhongketech.sunflower.transport.model.SpecialNums;

import com.zhongketech.sunflower.transport.model.UserDao;
import com.zhongketech.sunflower.transport.model.SchoolDao;
import com.zhongketech.sunflower.transport.model.ClassesDao;
import com.zhongketech.sunflower.transport.model.ParentsDao;
import com.zhongketech.sunflower.transport.model.AuthorizationsDao;
import com.zhongketech.sunflower.transport.model.SmsCodeDao;
import com.zhongketech.sunflower.transport.model.MyRequestDao;
import com.zhongketech.sunflower.transport.model.RequestDao;
import com.zhongketech.sunflower.transport.model.MyContactsDao;
import com.zhongketech.sunflower.transport.model.ContactDao;
import com.zhongketech.sunflower.transport.model.MyApplicationsInfoDao;
import com.zhongketech.sunflower.transport.model.MySupervisionDao;
import com.zhongketech.sunflower.transport.model.SupervisionDao;
import com.zhongketech.sunflower.transport.model.TimesDao;
import com.zhongketech.sunflower.transport.model.EyeProtectDao;
import com.zhongketech.sunflower.transport.model.ApplicationControlDao;
import com.zhongketech.sunflower.transport.model.ApplicationsDao;
import com.zhongketech.sunflower.transport.model.CallDao;
import com.zhongketech.sunflower.transport.model.SmsDao;
import com.zhongketech.sunflower.transport.model.ScreenLockDao;
import com.zhongketech.sunflower.transport.model.NetworkDao;
import com.zhongketech.sunflower.transport.model.SpecialNumsDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig userDaoConfig;
    private final DaoConfig schoolDaoConfig;
    private final DaoConfig classesDaoConfig;
    private final DaoConfig parentsDaoConfig;
    private final DaoConfig authorizationsDaoConfig;
    private final DaoConfig smsCodeDaoConfig;
    private final DaoConfig myRequestDaoConfig;
    private final DaoConfig requestDaoConfig;
    private final DaoConfig myContactsDaoConfig;
    private final DaoConfig contactDaoConfig;
    private final DaoConfig myApplicationsInfoDaoConfig;
    private final DaoConfig mySupervisionDaoConfig;
    private final DaoConfig supervisionDaoConfig;
    private final DaoConfig timesDaoConfig;
    private final DaoConfig eyeProtectDaoConfig;
    private final DaoConfig applicationControlDaoConfig;
    private final DaoConfig applicationsDaoConfig;
    private final DaoConfig callDaoConfig;
    private final DaoConfig smsDaoConfig;
    private final DaoConfig screenLockDaoConfig;
    private final DaoConfig networkDaoConfig;
    private final DaoConfig specialNumsDaoConfig;

    private final UserDao userDao;
    private final SchoolDao schoolDao;
    private final ClassesDao classesDao;
    private final ParentsDao parentsDao;
    private final AuthorizationsDao authorizationsDao;
    private final SmsCodeDao smsCodeDao;
    private final MyRequestDao myRequestDao;
    private final RequestDao requestDao;
    private final MyContactsDao myContactsDao;
    private final ContactDao contactDao;
    private final MyApplicationsInfoDao myApplicationsInfoDao;
    private final MySupervisionDao mySupervisionDao;
    private final SupervisionDao supervisionDao;
    private final TimesDao timesDao;
    private final EyeProtectDao eyeProtectDao;
    private final ApplicationControlDao applicationControlDao;
    private final ApplicationsDao applicationsDao;
    private final CallDao callDao;
    private final SmsDao smsDao;
    private final ScreenLockDao screenLockDao;
    private final NetworkDao networkDao;
    private final SpecialNumsDao specialNumsDao;

    public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        userDaoConfig = daoConfigMap.get(UserDao.class).clone();
        userDaoConfig.initIdentityScope(type);

        schoolDaoConfig = daoConfigMap.get(SchoolDao.class).clone();
        schoolDaoConfig.initIdentityScope(type);

        classesDaoConfig = daoConfigMap.get(ClassesDao.class).clone();
        classesDaoConfig.initIdentityScope(type);

        parentsDaoConfig = daoConfigMap.get(ParentsDao.class).clone();
        parentsDaoConfig.initIdentityScope(type);

        authorizationsDaoConfig = daoConfigMap.get(AuthorizationsDao.class).clone();
        authorizationsDaoConfig.initIdentityScope(type);

        smsCodeDaoConfig = daoConfigMap.get(SmsCodeDao.class).clone();
        smsCodeDaoConfig.initIdentityScope(type);

        myRequestDaoConfig = daoConfigMap.get(MyRequestDao.class).clone();
        myRequestDaoConfig.initIdentityScope(type);

        requestDaoConfig = daoConfigMap.get(RequestDao.class).clone();
        requestDaoConfig.initIdentityScope(type);

        myContactsDaoConfig = daoConfigMap.get(MyContactsDao.class).clone();
        myContactsDaoConfig.initIdentityScope(type);

        contactDaoConfig = daoConfigMap.get(ContactDao.class).clone();
        contactDaoConfig.initIdentityScope(type);

        myApplicationsInfoDaoConfig = daoConfigMap.get(MyApplicationsInfoDao.class).clone();
        myApplicationsInfoDaoConfig.initIdentityScope(type);

        mySupervisionDaoConfig = daoConfigMap.get(MySupervisionDao.class).clone();
        mySupervisionDaoConfig.initIdentityScope(type);

        supervisionDaoConfig = daoConfigMap.get(SupervisionDao.class).clone();
        supervisionDaoConfig.initIdentityScope(type);

        timesDaoConfig = daoConfigMap.get(TimesDao.class).clone();
        timesDaoConfig.initIdentityScope(type);

        eyeProtectDaoConfig = daoConfigMap.get(EyeProtectDao.class).clone();
        eyeProtectDaoConfig.initIdentityScope(type);

        applicationControlDaoConfig = daoConfigMap.get(ApplicationControlDao.class).clone();
        applicationControlDaoConfig.initIdentityScope(type);

        applicationsDaoConfig = daoConfigMap.get(ApplicationsDao.class).clone();
        applicationsDaoConfig.initIdentityScope(type);

        callDaoConfig = daoConfigMap.get(CallDao.class).clone();
        callDaoConfig.initIdentityScope(type);

        smsDaoConfig = daoConfigMap.get(SmsDao.class).clone();
        smsDaoConfig.initIdentityScope(type);

        screenLockDaoConfig = daoConfigMap.get(ScreenLockDao.class).clone();
        screenLockDaoConfig.initIdentityScope(type);

        networkDaoConfig = daoConfigMap.get(NetworkDao.class).clone();
        networkDaoConfig.initIdentityScope(type);

        specialNumsDaoConfig = daoConfigMap.get(SpecialNumsDao.class).clone();
        specialNumsDaoConfig.initIdentityScope(type);

        userDao = new UserDao(userDaoConfig, this);
        schoolDao = new SchoolDao(schoolDaoConfig, this);
        classesDao = new ClassesDao(classesDaoConfig, this);
        parentsDao = new ParentsDao(parentsDaoConfig, this);
        authorizationsDao = new AuthorizationsDao(authorizationsDaoConfig, this);
        smsCodeDao = new SmsCodeDao(smsCodeDaoConfig, this);
        myRequestDao = new MyRequestDao(myRequestDaoConfig, this);
        requestDao = new RequestDao(requestDaoConfig, this);
        myContactsDao = new MyContactsDao(myContactsDaoConfig, this);
        contactDao = new ContactDao(contactDaoConfig, this);
        myApplicationsInfoDao = new MyApplicationsInfoDao(myApplicationsInfoDaoConfig, this);
        mySupervisionDao = new MySupervisionDao(mySupervisionDaoConfig, this);
        supervisionDao = new SupervisionDao(supervisionDaoConfig, this);
        timesDao = new TimesDao(timesDaoConfig, this);
        eyeProtectDao = new EyeProtectDao(eyeProtectDaoConfig, this);
        applicationControlDao = new ApplicationControlDao(applicationControlDaoConfig, this);
        applicationsDao = new ApplicationsDao(applicationsDaoConfig, this);
        callDao = new CallDao(callDaoConfig, this);
        smsDao = new SmsDao(smsDaoConfig, this);
        screenLockDao = new ScreenLockDao(screenLockDaoConfig, this);
        networkDao = new NetworkDao(networkDaoConfig, this);
        specialNumsDao = new SpecialNumsDao(specialNumsDaoConfig, this);

        registerDao(User.class, userDao);
        registerDao(School.class, schoolDao);
        registerDao(Classes.class, classesDao);
        registerDao(Parents.class, parentsDao);
        registerDao(Authorizations.class, authorizationsDao);
        registerDao(SmsCode.class, smsCodeDao);
        registerDao(MyRequest.class, myRequestDao);
        registerDao(Request.class, requestDao);
        registerDao(MyContacts.class, myContactsDao);
        registerDao(Contact.class, contactDao);
        registerDao(MyApplicationsInfo.class, myApplicationsInfoDao);
        registerDao(MySupervision.class, mySupervisionDao);
        registerDao(Supervision.class, supervisionDao);
        registerDao(Times.class, timesDao);
        registerDao(EyeProtect.class, eyeProtectDao);
        registerDao(ApplicationControl.class, applicationControlDao);
        registerDao(Applications.class, applicationsDao);
        registerDao(Call.class, callDao);
        registerDao(Sms.class, smsDao);
        registerDao(ScreenLock.class, screenLockDao);
        registerDao(Network.class, networkDao);
        registerDao(SpecialNums.class, specialNumsDao);
    }
    
    public void clear() {
        userDaoConfig.getIdentityScope().clear();
        schoolDaoConfig.getIdentityScope().clear();
        classesDaoConfig.getIdentityScope().clear();
        parentsDaoConfig.getIdentityScope().clear();
        authorizationsDaoConfig.getIdentityScope().clear();
        smsCodeDaoConfig.getIdentityScope().clear();
        myRequestDaoConfig.getIdentityScope().clear();
        requestDaoConfig.getIdentityScope().clear();
        myContactsDaoConfig.getIdentityScope().clear();
        contactDaoConfig.getIdentityScope().clear();
        myApplicationsInfoDaoConfig.getIdentityScope().clear();
        mySupervisionDaoConfig.getIdentityScope().clear();
        supervisionDaoConfig.getIdentityScope().clear();
        timesDaoConfig.getIdentityScope().clear();
        eyeProtectDaoConfig.getIdentityScope().clear();
        applicationControlDaoConfig.getIdentityScope().clear();
        applicationsDaoConfig.getIdentityScope().clear();
        callDaoConfig.getIdentityScope().clear();
        smsDaoConfig.getIdentityScope().clear();
        screenLockDaoConfig.getIdentityScope().clear();
        networkDaoConfig.getIdentityScope().clear();
        specialNumsDaoConfig.getIdentityScope().clear();
    }

    public UserDao getUserDao() {
        return userDao;
    }

    public SchoolDao getSchoolDao() {
        return schoolDao;
    }

    public ClassesDao getClassesDao() {
        return classesDao;
    }

    public ParentsDao getParentsDao() {
        return parentsDao;
    }

    public AuthorizationsDao getAuthorizationsDao() {
        return authorizationsDao;
    }

    public SmsCodeDao getSmsCodeDao() {
        return smsCodeDao;
    }

    public MyRequestDao getMyRequestDao() {
        return myRequestDao;
    }

    public RequestDao getRequestDao() {
        return requestDao;
    }

    public MyContactsDao getMyContactsDao() {
        return myContactsDao;
    }

    public ContactDao getContactDao() {
        return contactDao;
    }

    public MyApplicationsInfoDao getMyApplicationsInfoDao() {
        return myApplicationsInfoDao;
    }

    public MySupervisionDao getMySupervisionDao() {
        return mySupervisionDao;
    }

    public SupervisionDao getSupervisionDao() {
        return supervisionDao;
    }

    public TimesDao getTimesDao() {
        return timesDao;
    }

    public EyeProtectDao getEyeProtectDao() {
        return eyeProtectDao;
    }

    public ApplicationControlDao getApplicationControlDao() {
        return applicationControlDao;
    }

    public ApplicationsDao getApplicationsDao() {
        return applicationsDao;
    }

    public CallDao getCallDao() {
        return callDao;
    }

    public SmsDao getSmsDao() {
        return smsDao;
    }

    public ScreenLockDao getScreenLockDao() {
        return screenLockDao;
    }

    public NetworkDao getNetworkDao() {
        return networkDao;
    }

    public SpecialNumsDao getSpecialNumsDao() {
        return specialNumsDao;
    }

}
